﻿using HK.Core.Serializable.Attribute;
using HK.Core.Utils;
using HK.Editor.Serializable.Protocol.Drawer;
using UnityEditor;

namespace HK.Editor.Serializable.Drawer
{
    /// <summary>
    /// Drawer - 校验码
    /// </summary>
    [CustomPropertyDrawer(typeof(CheckCodeAttribute))]
    public class CheckCodeDrawer : GUIPropertyDrawer<CheckCodeAttribute>, ICheckCodeDrawer
    {
        /// <summary>
        /// 校验码
        /// </summary>
        public CheckMode Mode => SelfAttr?.Mode ?? CheckMode.Md5;
    }
}
